package com.wyl.learn04;

/**
 * @author 吴宇亮 on 2023/6/7 17:35
 */
public class MessageBean {

    /**
     * 设置消息的id，用于给消费者判断是否有重复消费
     */
    private String id;
    /**
     * 消息要发到哪个交换机中
     */
    private String exchangeName;
    /**
     * 消息发到交换机中的routerKey
     */
    private String routerKey;
    /**
     * 消息要发到哪个队列中，优先级比exchangeName要高
     */
    private String queueName;
    /**
     * 要发送的消息
     */
    private String message;
    /**
     * 该怒爱
     */
    private String ttl;

    public MessageBean(String message) {
        this.message = message;
    }

    public String getId() {
        return id;
    }

    public MessageBean setId(String id) {
        this.id = id;
        return this;
    }

    public String getExchangeName() {
        return exchangeName;
    }

    public MessageBean setExchangeName(String exchangeName) {
        this.exchangeName = exchangeName;
        return this;
    }

    public String getRouterKey() {
        return routerKey;
    }

    public MessageBean setRouterKey(String routerKey) {
        this.routerKey = routerKey;
        return this;
    }

    public String getQueueName() {
        return queueName;
    }

    public MessageBean setQueueName(String queueName) {
        this.queueName = queueName;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public MessageBean setMessage(String message) {
        this.message = message;
        return this;
    }

    public String getTtl() {
        return ttl;
    }

    public MessageBean setTtl(String ttl) {
        this.ttl = ttl;
        return this;
    }

    public MessageBean setTtl(Long ttl) {
        this.ttl = ttl.toString();
        return this;
    }
}
